package com.ray.client;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import com.ray.basic.BASIC;

public class TCPEchoClient{
	public static void main(String [] args) throws Exception {
		Socket socket=new Socket(BASIC.get_server(), BASIC.get_servPort());
		InputStream in = socket.getInputStream();
		OutputStream out = socket.getOutputStream();
		
		Thread read= new Thread(new Client_in(in));
		read.start();
		
		Thread write= new Thread(new Client_out(out));
		write.start();
		
		Thread input= new Thread(new System_in());
		input.start();
		
		Thread udpout= new Thread(new Udp_out());
		udpout.start();
		
		write.join();
		socket.close();
	}
}
